#@front_layout()
#define content()
<script src="/fts/js/user.js"></script>
<div class="block box">
    <div id="ur_here">
        当前位置: <a href="/">首页</a> <code>&gt;</code> 购物流程
    </div>
</div>

<div class="blank"></div>
<div class="flowBox">
    <h6><span>商品列表</span></h6>
    <form id="formCart" name="formCart" method="post" action="/order/cart">
        <table width="99%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
            <tbody>
            <tr>
                <th bgcolor="#ffffff">商品名称</th>
                <th bgcolor="#ffffff">属性</th>
                <th bgcolor="#ffffff">市场价</th>
                <th bgcolor="#ffffff">本店价</th>
                <th bgcolor="#ffffff">购买数量</th>
                <th bgcolor="#ffffff">小计</th>
                <th bgcolor="#ffffff">操作</th>
            </tr>
            #for(op:list)
            #set(netTotal = pmap[op.pid].netPrice * op.num)
            #set(marketTotal = pmap[op.pid].marketPrice * op.num)
            <tr>
                <td bgcolor="#ffffff" align="center">
                    <a href="http://bj-dahon.com/goods.php?id=4" target="_blank"><img src="/upload#(pmap[op.pid].image)" border="0"
                                                                                      title="#(pmap[op.pid].title)"></a><br>
                    <a href="http://bj-dahon.com/goods.php?id=4" target="_blank" class="f6">#(pmap[op.pid].name)</a>
                </td>
                <td bgcolor="#ffffff">轮圈尺寸:20寸 <br>
                    车架材质:高碳钢 <br>
                    速比:6速 <br>
                    刹车:V刹 <br>
                </td>
                <td align="right" bgcolor="#ffffff">￥#(pmap[op.pid].marketPrice)元</td>
                <td align="right" bgcolor="#ffffff">￥#(pmap[op.pid].netPrice)元</td>
                <td align="right" bgcolor="#ffffff">
                    <input type="text" name="goods_number_#(op.id)" id="goods_number_#(op.id)" value="#(op.num)" size="4" class="inputBg" style="text-align:center " onkeydown="showdiv(this)">
                </td>
                <td align="right" bgcolor="#ffffff">￥#(pmap[op.pid].netPrice * op.num)元</td>
                <td align="center" bgcolor="#ffffff">
                    <a href="javascript:if (confirm(&#39;您确实要把该商品移出购物车吗？&#39;)) location.href=/order/delCart?opid=#(op.id)" class="f6">删除</a>
                </td>
            </tr>
            #end
            </tbody>
        </table>
        <table width="99%" align="center" border="0" cellpadding="5" cellspacing="1" bgcolor="#dddddd">
            <tbody>
            <tr>
                <td bgcolor="#ffffff">
                    购物金额小计 ￥#(netTotal)元，比市场价 ￥#(marketTotal)元 节省了 ￥#(marketTotal - netTotal)元 (#((marketTotal - netTotal)/marketTotal * 100)%)
                </td>
                <td align="right" bgcolor="#ffffff">
                    <input type="button" value="清空购物车" class="bnt_blue_1" onclick="location.href=/order/clearCart">
                    <input name="submit" type="submit" class="bnt_blue_1" value="更新购物车">
                </td>
            </tr>
            </tbody>
        </table>
        <input type="hidden" name="step" value="update_cart">
    </form>
    <table width="99%" align="center" border="0" cellpadding="5" cellspacing="0" bgcolor="#dddddd">
        <tbody>
        <tr>
            <td bgcolor="#ffffff"><a href="/"><img src="/fts/images/continue.gif" alt="continue"></a></td>
            <td bgcolor="#ffffff" align="right"><a href="/order/payAddress"><img src="/fts/images/checkout.gif" alt="checkout"></a></td>
        </tr>
        </tbody>
    </table>

</div>
<div class="blank5"></div>

#end
